# CFLAGS=-g +Wstrict-aliasing +Wuninitialized -O1
# CXXFLAGS=-g +Wstrict-aliasing +Wuninitialized -O1 # -O0 -fno-inline
INC=-I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -I/usr/local/include/girl-2.0 -I/usr/local/include/girlTools-1.0 -I/usr/local/include/ise-0.2 -I/usr/local/include/DoQuMeasures-1.0
PYINC=/usr/include/python2.6
LIBS=-lgirl-2.0 -lgirlTools-1.0 -lise-0.2   
DEFS=-DGIRL_HAVE_CONFIG_H -DWITH_ZLIB

all: example.so

example.so: example.i
	swig $(INC) -php  -cppext cxx  -c++ example.i
	echo compiling
	g++ $(CXXFLAGS)  -undefined suppress  -bundle -flat_namespace   $(DEFS) -fPIC $(INC) example_wrap.cxx \
	    -o example.so -lm -lDoQuMeasures-1.0 $(LIBS)

clean:
	rm -rf *.so *.cxx *.o example.php *_wrap.cpp *_wrap.h *_wrap.cxx build *.pyc *.err *~
